<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>login form</title>
<script language="JavaScript">

function getXMLHttpRequest() {
    if (window.ActiveXObject) {
        try {
            return new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e1) {
            try {
                return new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e2) {
                return null;
            }
        }
    } else if (window.XMLHttpRequest) {
        return new XMLHttpRequest();
    } else {
        return null;
    }
}
function req() {
	alert(html.innerHTML);
	p = document.user;
    param = "userId="+p.userId.value+"&password="+p.password.value;
    xhr = getXMLHttpRequest();
    xhr.onreadystatechange = responseHello;
    xhr.open("POST", "/login.plan?"+param, true);
    xhr.send(null);
}
function responseHello() {
    if (xhr.readyState == 4) {
        if (xhr.status == 200) {
            document.getElementById("aa").innerHTML = xhr.responseText;
        } else {
            alert("Fail : " + xhr.status);
        }
    }
}
</script>
</head>
<body>
<%@include file="accoun.jsp" %>
</body>
</html>